class AdminwebsitearticlesController < ApplicationController
before_filter :authorize
    layout "adminwebsitearticles"
    
      active_scaffold :article do |config|
  config.label = "Articles"
#  config.action_links.add 'export_csv', :label => 'Export to Excel', :page => true
#  config.action_links.add 'trunc_tbl', :label => 'Clear DataBase', :page => true
	  config.columns[:category].form_ui = :select  
    config.columns[:synopsis].form_ui = :textarea
    config.columns[:synopsis].options = {:rows => 60, :cols => 100}


    config.columns[:body].form_ui = :textarea
    config.columns[:body].options = {:rows => 60, :cols => 100}
    
    config.columns[:published].form_ui = :checkbox    
	  config.columns = [:title,:synopsis,:body,:category,:published]

config.action_links.add 'mytest', :label => 'Websites', :type => :record, :page => true
	 
  end
  
  def conditions_for_collection
   ['articles.user_id = ?', session[:user_id] ]
  end
  
  def mytest
  @all_websitesinfs = Websitesinf.find(:all)
    @article = Article.find(params[:id])
  end
  
 
end
